<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <jsp:include page="goodclass.jsp"></jsp:include>
    <%@page import="dao.*" %>
    <%@ page import="java.util.*,java.text.*"%>
   <jsp:useBean id="dao" class="dao.GoodUtil" scope="request"></jsp:useBean>
<!DOCTYPE html >
<html>
<head>
<style type="text/css">
.div1{
margin-left:10%;

}
td{
width:120px;
background:#ffcc66 ;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div class="div1">
       <table>
		<tr><td>商品号</td><td>名称</td><td>价格</td><td>品牌</td><td>库存</td></tr>
<%
	request.setCharacterEncoding("utf-8");
    String goodclass=request.getParameter("classsearch");
    List list=dao.find(goodclass);
	Goods good=null;
	for(int i=0;i<list.size();i++){
		good=(Goods)list.get(i);	                             %>
		
		<tr>
			<td><a href="servlet/ToViewGood?id=<%=good.getId() %>" title="查看详情"><%=good.getId() %></a></td>
			<td><%=good.getName() %></td>
			<td><%=good.getPrice() %></td>
			<td><%=good.getBrand() %></td>
			<td><%=good.getNumber() %></td>
		</tr>
	    
	    
	     
	   
	<% 
	}
	%>
	

</table>
	    </div>
</body>
</html>